/*
 * OutFile.h
 *
 *  Created on: 2011/07/02
 *      Author: naoki
 */

#ifndef INCLUDED_NTENGINE_FILEIO_OUTFILE_H
#define INCLUDED_NTENGINE_FILEIO_OUTFILE_H

namespace NTEngine {
namespace FileIO {

/**
 * @brief 出力ファイル
 */
class OutFile{
public:
	static OutFile create( const char* filename, const char* data, int size );
	///セーブ終わった？
	bool isFinished() const;
	///エラー出てます？
	bool isError() const;

	//以下ユーザは意識しない関数群
	OutFile();
	OutFile( const OutFile& );
	~OutFile();
	operator void*() const;
	OutFile& operator=( const OutFile& );
	void release();
	bool operator==( const OutFile& ) const;
	bool operator!=( const OutFile& ) const;
	int referenceCount() const;
	class Impl;
private:
	Impl* mImpl;
};

} //namespace FileIO
} //namespace NTEngine


#endif // INCLUDED_NTENGINE_FILEIO_OUTFILE_H
